﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;
using CodeWork.Library.Data;
using System.Collections.Specialized;
using CodeWork.Library.Web;
using CodeWork.BLL;
using CodeWork.DAL.DataContainers.SqlServer;
using CodeWork.Library;
using System.Drawing;
using System.Drawing.Imaging;
using log4net;
using System.Data.SqlTypes;
using System.Transactions;

public partial class _Default : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            //UserManager um = new UserManager();
            //um.RegisterNewUser();

            //SiteUser.Create("jalal", "2343", "jalal@desme.com", false, false, true, "jfdfdksf", DateTime.Now, DateTime.Now);
            //SiteUser siteUser = SiteUser.Load(11);
            //siteUser.IsActive = true;
            //siteUser.Save();
            //string time = Utility.ConvertTo12HourTime("23:34:55", new char[]{':'});
            //DateTime date = DateTime.Parse(time);
            //SiteUser.Delete(11);
            //ImageResizer.SaveAs("~/upload/proggasoft_jpegs.Jpeg", "~/upload/", ImageFormat.Jpeg,"_jg");

            //throw new ApplicationException("there was a big problem");
            
        }
        catch (Exception ex)
        {
            ILog Log = LogHelper.GetHandledFileLogger("~/_Default");
            if (Log.IsInfoEnabled)
            {
                Log.Info("problem : " + ex.Message);
            }
        }

    }

    protected void delete_Click(object sender, EventArgs e)
    {
        if (FileAccessUtility.DeleteFile("~/upload/Copy of proggasoft.png"))
            Response.Write("success");
        else
            Response.Write("failed");
    }

}
